Skip to content

Implement TinyGo Environment Logic and Client Fix#3

Open
cdvelop wants to merge 1 commit intomainfrom
implement-env-logic-and-wasmbuild-fix-11817058800369912870
Open

Implement TinyGo Environment Logic and Client Fix#3
cdvelop wants to merge 1 commit intomainfrom
implement-env-logic-and-wasmbuild-fix-11817058800369912870

Conversation

@cdvelop
Copy link
Copy Markdown
Contributor

@cdvelop cdvelop commented Apr 2, 2026

This PR implements Stages 4 and 5 of the TinyGo installation plan.

Changes:

  • env.go: Added GetRoot() to determine the TinyGo root directory and GetEnv() to generate a modified environment slice containing TINYGOROOT and an updated PATH. This avoids mutating the global process environment.
  • env_test.go: Added comprehensive unit tests for both system and local installation scenarios, ensuring correct environment construction and lack of global mutation.
  • client/wasmbuild.go: Introduced a new client package that demonstrates the fix for the os.Setenv bug. It uses tinygo.GetEnv() to inject the necessary environment variables directly into the compiler subprocess.

All changes have been verified with go test ./... and go build ./client/....


PR created automatically by Jules for task 11817058800369912870 started by @cdvelop

- Added `GetRoot` and `GetEnv` to `tinygo` package for safe environment handling.
- Added unit tests for new environment functions in `env_test.go`.
- Created `client/wasmbuild.go` implementing the `GetEnv` pattern, replacing the use of global `os.Setenv`.
- Verified all tests pass and the new package compiles correctly.

Co-authored-by: cdvelop <44058491+cdvelop@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant